<template>
  <div style="padding: 20px">
    <el-card>
      <div slot="header">
        <span>编辑公告</span>
        <el-button
          style="float: right; padding: 0; margin-left: 10px"
          type="text"
          @click="back"
          >返回</el-button
        >
        <el-button style="float: right; padding: 0" type="text">保存</el-button>
      </div>
      <div style="padding-top: 20px">
        <el-form ref="form" :model="form" label-width="80px">
          <el-form-item label="标题">
            <el-input placeholder="" style="width: 35%"></el-input>
          </el-form-item>
          <el-form-item label="内容"></el-form-item>
          <el-form-item label="附件">
            <el-upload
              class="upload-demo"
              action="https://jsonplaceholder.typicode.com/posts/"
              :on-preview="handlePreview"
              :on-remove="handleRemove"
              :before-remove="beforeRemove"
              multiple
            >
              <el-button size="small" type="primary">点击上传</el-button>
              <div slot="tip" class="el-upload__tip">
                只能上传jpg/png文件，且不超过500kb
              </div>
            </el-upload>
          </el-form-item>
          <el-form-item label="是否显示">
            <el-switch v-model="model"></el-switch>
          </el-form-item>
          <el-form-item label="发布日期">
            <el-date-picker
              v-model="value1"
              type="datetime"
              placeholder="请选择日期时间"
              style="width: 35%"
            >
            </el-date-picker>
          </el-form-item>
          <el-form-item label="点击量">
            <el-input placeholder="" style="width: 35%"></el-input>
          </el-form-item>
          <el-form-item label="排序">
            <el-input placeholder="" style="width: 35%"></el-input>
          </el-form-item>
          <el-form-item label="外部链接">
            <el-input placeholder="" style="width: 35%"></el-input>
          </el-form-item>
          <el-form-item label="来源">
            <el-radio v-model="radio" label="原创"></el-radio>
            <el-radio v-model="radio" label="转载"></el-radio>
          </el-form-item>
          <el-form-item label="seo关键词">
            <el-input placeholder="" style="width: 35%"></el-input>
          </el-form-item>
          <el-form-item label="seo描述">
            <el-input
              placeholder=""
              type="textarea"
              :rows="7"
              style="width: 35%"
            ></el-input>
          </el-form-item>
          <el-form-item label="">
            <el-button type="primary">保存</el-button>
            <el-button @click="back">返回</el-button>
          </el-form-item>
        </el-form>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      model: true,
    };
  },
  methods: {
    back() {
      this.$router.back()
    },
  },
};
</script>

<style lang="scss" scoped></style>
